
<template>
    <div class="main">
        <top-bar></top-bar>
        <div class="main-mains w90">
            <div class="main-mains-l">
                <router-link to="/main">
                    <div class="main-mains-l-return">
                        <span>←</span>
                        返回首页
                    </div>
                </router-link>
                <router-link to="/property">
                    <div>便民电话</div>
                </router-link>
                <router-link to="/living">
                    <div>发布生活区信息</div>
                </router-link>
                <router-link to="/propertylist">
                    <div class="active">已发布生活区信息</div>
                </router-link>

            </div>
            <div class="main-mains-r">
                <div class="main-retuns" @click="retunsLast()">
                    ← 返回
                </div>
                <div class="main-new-details">
                    <div class="main-new-title">
                        {{dataDetails.title}}
                    </div>
                    <div class="main-new-cons" v-html='dataDetails.context'>

                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import topBar from "../public/top";
export default {
  components: {
    topBar
  },
  data() {
    return {
      id: this.$route.params.id,
      dataDetails: ""
    };
  },
  methods: {
    retunsLast() {
      history.go(-1);
    },
    getNewDetails() {
      let _this = this;
      let datas = {
        id: _this.id
      };
      datas = JSON.stringify(datas);
      _this
        .$http({
          url: _this.urls + "/propertyInfo/findById.do",
          method: "post",
          data: datas
        })
        .then(function(res) {
          let data = res.data;
          if (data.status == "success") {
            _this.dataDetails = data.data;
          } else {
            _this.$message({
              showClose: true,
              message: data.msg,
              type: "error"
            });
          }
        })
        .catch(function(error) {
          console.log(error);
        });
    }
  },
  mounted() {
    this.getNewDetails();
  }
};
</script>

<style lang="less">
@import "property.less";
</style>



